package com.jdrx.sw.sewage.beans.entity;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

@ApiModel(value = "DeviceTimeDataPO", description = "设备实时数据")
@Data
public class DeviceTimeDataPO implements Serializable {
    private static final long serialVersionUID = -1206960462117924923L;

    @NotNull
    @Range(min = 1)
    @ApiModelProperty(value = "设备id(作为数据唯一标识)", required = true)
    private Long devId;

    @NotNull
    @Range(min = 1)
    @ApiModelProperty(value = "设备id(作为数据唯一标识)", required = true)
    private Long stationId;

    @ApiModelProperty(value = "JSON数据", required = true)
    private JSONObject jsonVal;

    @ApiModelProperty(value = "采集时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime collectTime;

    @ApiModelProperty(value = "创建时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
}